//package com.web.controller;
//
//import com.alibaba.fastjson2.JSON;
//import com.web.entity.ResponseResult;
//import com.web.service.StudentService;
//import jakarta.servlet.ServletException;
//import jakarta.servlet.annotation.WebServlet;
//import jakarta.servlet.http.HttpServlet;
//import jakarta.servlet.http.HttpServletRequest;
//import jakarta.servlet.http.HttpServletResponse;
//import org.springframework.web.bind.annotation.CrossOrigin;
//
//import javax.annotation.Resource;
//import java.io.IOException;
//
///**
// * 删除学生的数据接口
// */
//@CrossOrigin
//@WebServlet("/deleteStudent")
//public class DeleteStudentServlet extends HttpServlet {
//
//    @Resource
//    private StudentService studentService;
//
//    @Override
//    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        //获得学生信息参数
//        String sId = req.getParameter("id");
//        int id = 0;
//        if(sId != null){
//            id = Integer.parseInt(sId);
//        }
//
//        //删除学生
//        studentService.removeStudent(id);
//        //返回消息
//        resp.getWriter().write(JSON.toJSONString(new ResponseResult(200,"OK",null)));
//    }
//}
